﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using MapCenterSystem.ServiceProvider;
using MapCenterSystem.Configuration;
using MapCenterSystem.DataInfo;
using MapCenterSystem.DataAccess;

namespace MapCenterSytem.Process
{
    public class Map
    {
        public static byte[] GetMap(MapInfo map)
        {
            MapProviderService mapService = (MapProviderService)Activator.CreateInstance(Type.GetType(GlobalConfig.GetLibraryMap(map.Source)));
            byte[] result= mapService.GetMap(map);
            mapService.Dispose();
            return result;
        }
    }
}
